package com.bjgzy.courselive.di.module;

import com.bjgzy.courselive.mvp.contract.OrderPayContract;
import com.bjgzy.courselive.mvp.model.OrderPayModel;
import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

/**
 * @author xubo
 * @date 2018-8-3 13:44:39
 */
@Module
public  class OrderPayModule {

    private OrderPayContract.View view;

    /**
     * 构建OrderPayModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public OrderPayModule(OrderPayContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    OrderPayContract.View provideOrderPayView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    OrderPayContract.Model provideOrderPayModel(OrderPayModel model) {
        return model;
    }

}